package p500.srm528;

import java.util.Arrays;

import utils.ExampleRunner;

/**
 * Created by IntelliJ IDEA.
 * User: smalex
 * Date: 12/28/11
 * Time: 11:40 AM
 */
public class Cut {
  public int getMaximum(int[] eelLengths, int maxCuts) {
    int result = 0;
    Arrays.sort(eelLengths);
    for (int i = 0; i < eelLengths.length; i++) {
      if (eelLengths[i] % 10 == 0) {
        while (eelLengths[i] >= 10) {
          if (eelLengths[i] == 10) {
            eelLengths[i] -= 10;
            result++;
          } else {
            if (maxCuts == 0) {
              break;
            }
            maxCuts--;
            eelLengths[i] -= 10;
            result++;
          }
        }
      }
    }
    for (int i = 0; i < eelLengths.length && maxCuts > 0; i++) {
      while (eelLengths[i] >= 10 && maxCuts > 0) {
        maxCuts--;
        eelLengths[i] -= 10;
        result++;
      }
    }
    return result;
  }

  public static void main(String[] args) {
    ExampleRunner.eq(1, 3, new Cut().getMaximum(new int[]{13, 20, 13}, 2));
    ExampleRunner.eq(2, 0, new Cut().getMaximum(new int[]{5, 5, 5, 5}, 2));
    ExampleRunner.eq(3, 5, new Cut().getMaximum(new int[]{34, 10, 48}, 4));
    ExampleRunner.eq(4, 16, new Cut().getMaximum(new int[]{30, 50, 30, 50}, 350));
    ExampleRunner.eq(5, 0, new Cut().getMaximum(new int[]{1}, 1));
    ExampleRunner.eq(6, 1, new Cut().getMaximum(new int[]{10}, 1));
    ExampleRunner.eq(7, 2, new Cut().getMaximum(new int[]{20}, 1));
    ExampleRunner.eq(8, 3, new Cut().getMaximum(new int[]{25, 15}, 3));
    ExampleRunner.eq(9, 3, new Cut().getMaximum(new int[]{25, 15}, 4));
    ExampleRunner.eq(10, 3, new Cut().getMaximum(new int[]{25, 15}, 5));
    ExampleRunner.eq(11, 52, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 3));
    ExampleRunner.eq(12, 54, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 4));
    ExampleRunner.eq(13, 54, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 5));
    ExampleRunner.eq(14, 54, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 50, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 1000));
    ExampleRunner.eq(15, 99, new Cut().getMaximum(new int[]{999}, 99));
    ExampleRunner.eq(16, 99, new Cut().getMaximum(new int[]{999}, 100));
    ExampleRunner.eq(17, 22, new Cut().getMaximum(new int[]{143, 32, 59, 128, 147}, 22));
    ExampleRunner.eq(18, 143, new Cut().getMaximum(new int[]{121, 117, 133, 169, 52, 71, 83, 112, 97, 53, 191, 173, 41, 124, 72}, 143));
    ExampleRunner.eq(19, 229, new Cut().getMaximum(new int[]{41, 22, 11, 159, 178, 37, 182, 182, 123, 95, 98, 19, 122, 2, 88, 175, 87, 62, 83, 139, 179, 37, 131, 15, 146}, 229));
    ExampleRunner.eq(20, 372, new Cut().getMaximum(new int[]{111, 163, 139, 108, 97, 125, 44, 92, 156, 49, 194, 142, 132, 42, 41, 67, 56, 176, 47, 175, 176, 154, 169, 13, 135, 133, 128, 188, 107, 7, 175, 4, 188, 59, 111}, 385));
    ExampleRunner.eq(21, 471, new Cut().getMaximum(new int[]{19, 87, 158, 158, 128, 94, 152, 168, 12, 158, 51, 24, 87, 101, 141, 174, 165, 174, 155, 107, 129, 78, 194, 129, 61, 75, 175, 66, 18, 116, 186, 129, 178, 5, 53, 65, 4, 196, 144, 41, 136, 85, 131, 107, 139}, 497));
    ExampleRunner.eq(22, 276, new Cut().getMaximum(new int[]{128, 553, 964, 371, 769}, 276));
    ExampleRunner.eq(23, 816, new Cut().getMaximum(new int[]{957, 653, 962, 452, 709, 985, 742, 705, 991, 153, 108, 683, 684, 21, 312}, 816));
    ExampleRunner.eq(24, 902, new Cut().getMaximum(new int[]{739, 618, 127, 164, 38, 961, 437, 61, 63, 463, 214, 528, 111, 949, 76, 706, 946, 292, 478, 25, 502, 372, 524, 807, 741}, 902));
    ExampleRunner.eq(25, 1000, new Cut().getMaximum(new int[]{537, 355, 775, 222, 801, 146, 938, 808, 206, 526, 281, 82, 411, 206, 934, 476, 405, 697, 939, 63, 483, 521, 208, 675, 647, 414, 509, 998, 889, 203, 831, 948, 605, 619, 597}, 1000));
    ExampleRunner.eq(26, 1000, new Cut().getMaximum(new int[]{426, 729, 121, 319, 647, 459, 117, 37, 107, 223, 526, 117, 695, 584, 845, 216, 114, 986, 831, 586, 448, 182, 894, 426, 775, 481, 426, 782, 745, 908, 37, 835, 471, 579, 775, 15, 755, 74, 439, 836, 73, 797, 268, 32, 579}, 1000));
    ExampleRunner.eq(27, 53, new Cut().getMaximum(new int[]{120, 100, 130, 190, 140, 40}, 48));
    ExampleRunner.eq(28, 175, new Cut().getMaximum(new int[]{160, 60, 10, 30, 200, 60, 100, 180, 200, 100, 170, 180, 60, 200, 40}, 163));
    ExampleRunner.eq(29, 280, new Cut().getMaximum(new int[]{100, 120, 120, 150, 20, 50, 120, 110, 160, 180, 110, 200, 50, 70, 180, 30, 80, 140, 80, 180, 60, 150, 200, 140}, 280));
    ExampleRunner.eq(30, 341, new Cut().getMaximum(new int[]{20, 40, 60, 90, 40, 150, 130, 50, 200, 110, 50, 80, 70, 130, 160, 80, 40, 110, 200, 50, 20, 40, 100, 170, 180, 170, 180, 150, 30, 190, 30, 160, 130}, 353));
    ExampleRunner.eq(31, 486, new Cut().getMaximum(new int[]{60, 40, 90, 190, 170, 90, 80, 70, 100, 180, 160, 130, 10, 200, 30, 170, 130, 150, 150, 170, 120, 140, 110, 160, 160, 60, 120, 70, 190, 60, 100, 60, 70, 190, 20, 170, 140, 170, 150, 130, 70, 30}, 510));
    ExampleRunner.eq(32, 185, new Cut().getMaximum(new int[]{580, 450, 340, 10, 190, 280}, 185));
    ExampleRunner.eq(33, 492, new Cut().getMaximum(new int[]{230, 90, 600, 510, 180, 240, 220, 10, 530, 760, 600, 10, 420, 380, 800}, 478));
    ExampleRunner.eq(34, 873, new Cut().getMaximum(new int[]{270, 320, 610, 40, 760, 620, 700, 440, 450, 230, 770, 230, 40, 510, 340, 780, 50, 520, 300, 180, 20, 520, 800, 610}, 851));
    ExampleRunner.eq(35, 1027, new Cut().getMaximum(new int[]{290, 490, 130, 740, 700, 300, 210, 800, 350, 320, 520, 50, 260, 610, 730, 560, 140, 670, 180, 170, 530, 690, 720, 640, 10, 240, 680, 780, 710, 570, 120, 420, 110}, 1000));
    ExampleRunner.eq(36, 1031, new Cut().getMaximum(new int[]{570, 380, 740, 300, 650, 650, 230, 130, 360, 130, 570, 330, 240, 700, 360, 650, 350, 180, 80, 60, 560, 280, 350, 490, 670, 590, 730, 500, 20, 790, 160, 130, 220, 540, 540, 360, 700, 310, 500, 660, 120, 440}, 1000));
    ExampleRunner.eq(37, 155, new Cut().getMaximum(new int[]{220, 120, 353, 470, 393}, 155));
    ExampleRunner.eq(38, 241, new Cut().getMaximum(new int[]{45, 490, 363, 30, 161, 315, 490, 187, 190, 90, 100, 233, 60, 414}, 234));
    ExampleRunner.eq(39, 599, new Cut().getMaximum(new int[]{429, 170, 255, 489, 290, 116, 480, 408, 180, 450, 470, 228, 329, 310, 59, 390, 211, 410, 413, 350, 460, 472, 182}, 588));
    ExampleRunner.eq(40, 542, new Cut().getMaximum(new int[]{187, 328, 420, 60, 2, 155, 380, 270, 110, 380, 34, 365, 4, 203, 248, 490, 410, 290, 440, 383, 380, 36, 175, 44, 360, 260, 387, 360, 73, 272, 210, 35}, 527));
    ExampleRunner.eq(41, 687, new Cut().getMaximum(new int[]{49, 49, 235, 453, 199, 60, 266, 10, 250, 148, 175, 260, 314, 433, 373, 141, 138, 230, 204, 390, 450, 180, 460, 455, 360, 240, 470, 190, 280, 240, 434, 12, 63, 200, 280, 70, 403, 345, 50, 409, 22}, 668));
    ExampleRunner.eq(42, 687, new Cut().getMaximum(new int[]{613, 930, 903, 574, 370, 390, 769, 992, 851, 502}, 687));
    ExampleRunner.eq(43, 726, new Cut().getMaximum(new int[]{109, 213, 300, 845, 836, 448, 40, 240, 240, 214, 961, 240, 94, 330, 430, 552, 980, 450, 135, 363}, 717));
    ExampleRunner.eq(44, 1015, new Cut().getMaximum(new int[]{942, 923, 300, 619, 980, 906, 530, 810, 920, 220, 520, 760, 350, 450, 568, 500, 969, 66, 151, 690, 488, 600, 541, 360, 931, 543, 240, 564, 387, 888}, 1000));
    ExampleRunner.eq(45, 1019, new Cut().getMaximum(new int[]{930, 40, 959, 303, 270, 600, 690, 844, 978, 557, 370, 932, 513, 960, 490, 770, 613, 896, 115, 1000, 811, 640, 752, 460, 700, 997, 350, 492, 241, 419, 580, 858, 920, 300, 310, 810, 70, 520, 976, 928}, 1000));
    ExampleRunner.eq(46, 1023, new Cut().getMaximum(new int[]{916, 60, 80, 863, 13, 84, 679, 719, 830, 851, 621, 359, 830, 432, 180, 746, 80, 140, 420, 167, 138, 250, 352, 461, 960, 260, 230, 760, 448, 660, 40, 153, 358, 440, 390, 850, 870, 850, 300, 292, 760, 140, 960, 570, 520, 980, 756, 722, 908, 772}, 1000));
    ExampleRunner.eq(47, 1035, new Cut().getMaximum(new int[]{430, 440, 300, 60, 20, 70, 540, 460, 160, 680, 430, 720, 280, 210, 530, 290, 960, 30, 200, 110, 320, 830, 470, 10, 240, 150, 810, 800, 150, 80, 20, 460, 660, 460, 10, 430, 750, 620, 190, 610, 660, 720, 400, 310, 910, 800, 720, 740, 790, 270}, 1000));
    ExampleRunner.eq(48, 1000, new Cut().getMaximum(new int[]{854, 849, 701, 162, 326, 767, 159, 218, 37, 632, 71, 29, 844, 735, 47, 914, 353, 954, 125, 254, 968, 901, 226, 981, 423, 247, 952, 747, 523, 115, 709, 393, 672, 366, 325, 989, 504, 228, 203, 951, 118, 879, 434, 557, 523, 509, 783, 955, 603, 198}, 1000));
    ExampleRunner.eq(49, 1005, new Cut().getMaximum(new int[]{209, 164, 456, 162, 442, 320, 171, 192, 386, 414, 440, 259, 445, 377, 141, 176, 250, 184, 250, 483, 453, 1, 415, 416, 44, 313, 103, 56, 244, 118, 277, 50, 291, 453, 287, 82, 229, 205, 27, 267, 497, 371, 35, 276, 446, 409, 48, 293, 384, 359}, 1000));
    ExampleRunner.eq(50, 1010, new Cut().getMaximum(new int[]{129, 171, 120, 15, 151, 153, 126, 507, 109, 202, 141, 258, 193, 91, 207, 18, 392, 32, 203, 438, 241, 18, 125, 338, 420, 121, 150, 372, 218, 187, 138, 40, 228, 50, 382, 122, 364, 80, 387, 30, 118, 400, 475, 220, 385, 404, 408, 389, 480, 497}, 1000));
    ExampleRunner.eq(51, 1015, new Cut().getMaximum(new int[]{318, 238, 10, 214, 438, 416, 1, 470, 440, 27, 88, 253, 430, 100, 212, 315, 401, 478, 378, 496, 251, 184, 150, 96, 180, 441, 40, 370, 169, 88, 9, 150, 176, 266, 439, 72, 123, 90, 114, 230, 20, 240, 142, 215, 170, 259, 444, 381, 133, 187}, 1000));
    ExampleRunner.eq(52, 1020, new Cut().getMaximum(new int[]{157, 43, 465, 510, 360, 440, 45, 48, 30, 131, 250, 374, 480, 296, 132, 440, 380, 80, 244, 210, 426, 420, 25, 110, 424, 189, 502, 26, 135, 380, 338, 357, 86, 490, 310, 455, 364, 379, 312, 370, 255, 108, 342, 176, 431, 189, 210, 240, 370, 240}, 1000));
    ExampleRunner.eq(53, 1025, new Cut().getMaximum(new int[]{242, 265, 527, 433, 270, 197, 90, 350, 363, 320, 426, 396, 460, 334, 40, 130, 500, 15, 322, 400, 70, 400, 270, 504, 54, 170, 500, 80, 340, 360, 68, 71, 270, 540, 350, 511, 500, 301, 176, 460, 20, 415, 330, 2, 134, 494, 178, 355, 310, 377}, 1000));
    ExampleRunner.eq(54, 1000, new Cut().getMaximum(new int[]{227, 407, 11, 418, 223, 678, 928, 166, 815, 293, 684, 282, 749, 397, 256, 836, 743, 776, 497, 836, 891, 19, 727, 605, 196, 93, 57, 402, 215, 265, 215, 485, 641, 819, 937, 122, 312, 438, 157, 173, 87, 973, 19, 152, 867, 456, 626, 702, 312, 115}, 1000));
    ExampleRunner.eq(55, 1027, new Cut().getMaximum(new int[]{480, 950, 500, 100, 410, 680, 910, 380, 940, 240, 310, 700, 530, 690, 670, 800, 320, 570, 700, 980, 610, 110, 700, 610, 160, 870, 570, 790, 100, 740, 880, 860, 620, 910, 790, 860, 920, 170, 200, 30, 370, 290, 850, 480, 380, 430, 890, 330, 840, 960}, 1000));
    ExampleRunner.eq(56, 100, new Cut().getMaximum(new int[]{9, 9, 1000, 9, 9, 9, 9, 9, 9, 9, 1000, 9, 1000, 9, 9, 9, 9, 9, 9, 9, 1000, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1000, 9, 9, 9, 9}, 99));
    ExampleRunner.eq(57, 101, new Cut().getMaximum(new int[]{9, 1000, 9, 9, 9, 9, 1000, 9, 9, 9, 1000, 1000, 9, 1000, 9, 1000, 1000, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1000, 9, 9, 9, 9, 1000, 9, 9, 9, 1000, 9, 9, 9, 9, 9}, 100));
    ExampleRunner.eq(58, 102, new Cut().getMaximum(new int[]{9, 9, 9, 9, 9, 9, 9, 1000, 9, 1000, 9, 9, 9, 9, 9, 9, 9, 1000, 9, 1000, 9, 9, 9, 9, 9, 1000, 1000, 1000, 1000, 9, 9, 9, 9, 9, 1000, 1000, 9, 1000, 1000, 9, 1000, 1000, 9, 9, 1000, 9, 9, 9, 9, 9}, 101));
    ExampleRunner.eq(59, 50, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 1));
    ExampleRunner.eq(60, 1050, new Cut().getMaximum(new int[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 20, 20, 20, 20, 20, 20, 20, 20, 20, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20}, 1000));
    ExampleRunner.eq(61, 2, new Cut().getMaximum(new int[]{30, 20, 15}, 1));
    ExampleRunner.eq(62, 3, new Cut().getMaximum(new int[]{13, 20, 13}, 2));
    ExampleRunner.eq(63, 8, new Cut().getMaximum(new int[]{1, 2, 3, 4, 5, 30, 6, 7, 8, 9, 50, 10, 11, 12, 13, 14, 15, 16, 30, 17, 18, 50}, 5));
    ExampleRunner.eq(64, 9, new Cut().getMaximum(new int[]{100, 90}, 8));
    ExampleRunner.eq(65, 6, new Cut().getMaximum(new int[]{30, 50, 30, 50}, 4));
    ExampleRunner.eq(66, 2, new Cut().getMaximum(new int[]{11, 20}, 1));
    ExampleRunner.eq(67, 4, new Cut().getMaximum(new int[]{40, 20, 20}, 2));
    ExampleRunner.eq(68, 7, new Cut().getMaximum(new int[]{50, 30, 40}, 5));
    ExampleRunner.eq(69, 11, new Cut().getMaximum(new int[]{100, 90, 20}, 9));
    ExampleRunner.eq(70, 3, new Cut().getMaximum(new int[]{13, 40, 30}, 2));
    ExampleRunner.eq(71, 5, new Cut().getMaximum(new int[]{23, 50, 30, 80, 20}, 3));
    ExampleRunner.eq(72, 4, new Cut().getMaximum(new int[]{30, 20, 20}, 2));
    ExampleRunner.eq(73, 4, new Cut().getMaximum(new int[]{100, 20}, 3));
    ExampleRunner.eq(74, 5, new Cut().getMaximum(new int[]{20, 100, 20}, 3));
    ExampleRunner.eq(75, 4, new Cut().getMaximum(new int[]{31, 40}, 3));
    ExampleRunner.eq(76, 2, new Cut().getMaximum(new int[]{30, 20}, 1));
    ExampleRunner.eq(77, 4, new Cut().getMaximum(new int[]{10, 30, 11, 21, 20, 21, 11, 30, 10}, 1));
    ExampleRunner.eq(78, 5, new Cut().getMaximum(new int[]{25, 25, 20, 30}, 3));
    ExampleRunner.eq(79, 5, new Cut().getMaximum(new int[]{40, 30, 20}, 3));
    ExampleRunner.eq(80, 3, new Cut().getMaximum(new int[]{23, 30}, 2));
    ExampleRunner.eq(81, 2, new Cut().getMaximum(new int[]{40, 30, 20}, 1));
    ExampleRunner.eq(82, 2, new Cut().getMaximum(new int[]{40, 20}, 1));
    ExampleRunner.eq(83, 3, new Cut().getMaximum(new int[]{50, 30}, 2));
    ExampleRunner.eq(84, 7, new Cut().getMaximum(new int[]{16, 32, 50, 20}, 5));
    ExampleRunner.eq(85, 5, new Cut().getMaximum(new int[]{40, 20, 20}, 3));
    ExampleRunner.eq(86, 13, new Cut().getMaximum(new int[]{120, 123, 45, 40, 30, 10, 20, 20, 22, 55, 30, 50}, 8));
    ExampleRunner.eq(87, 6, new Cut().getMaximum(new int[]{50, 60, 15, 20, 20, 20, 15, 15, 15}, 3));
    ExampleRunner.eq(88, 9, new Cut().getMaximum(new int[]{20, 20, 20, 30, 30, 30, 40, 40, 40, 40, 40}, 5));
    ExampleRunner.eq(89, 2, new Cut().getMaximum(new int[]{13, 20}, 1));
    ExampleRunner.eq(90, 3, new Cut().getMaximum(new int[]{40, 30}, 2));
    ExampleRunner.eq(91, 6, new Cut().getMaximum(new int[]{15, 15, 20, 20, 20, 25, 25}, 3));
    ExampleRunner.eq(92, 9, new Cut().getMaximum(new int[]{80, 40, 40}, 7));
    ExampleRunner.eq(93, 18, new Cut().getMaximum(new int[]{100, 20, 20, 20, 20, 20, 20, 20, 20, 20}, 9));
    ExampleRunner.eq(94, 16, new Cut().getMaximum(new int[]{50, 50, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20}, 8));
    ExampleRunner.eq(95, 5, new Cut().getMaximum(new int[]{48, 50}, 4));
    ExampleRunner.eq(96, 3, new Cut().getMaximum(new int[]{80, 20}, 2));
    ExampleRunner.eq(97, 2, new Cut().getMaximum(new int[]{100, 20}, 1));
    ExampleRunner.eq(98, 2, new Cut().getMaximum(new int[]{13, 40, 13}, 2));
    ExampleRunner.eq(99, 6, new Cut().getMaximum(new int[]{13, 30, 20, 20, 20}, 3));
    ExampleRunner.eq(100, 6, new Cut().getMaximum(new int[]{10, 13, 14, 15, 20, 30, 40, 28}, 3));
    ExampleRunner.eq(101, 6, new Cut().getMaximum(new int[]{50, 20, 20, 20}, 3));
    ExampleRunner.eq(102, 541, new Cut().getMaximum(new int[]{1000, 1000, 1000, 1000, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 300, 270, 110}, 531));
    ExampleRunner.eq(103, 8, new Cut().getMaximum(new int[]{30, 37, 41, 20, 20, 20, 10, 10}, 3));
    ExampleRunner.eq(104, 3, new Cut().getMaximum(new int[]{31, 30}, 2));
    ExampleRunner.eq(105, 901, new Cut().getMaximum(new int[]{931, 230, 984, 724, 288, 418, 20, 20, 401, 990, 333, 10, 11, 116, 452, 1000, 727, 217, 368, 165, 863, 370, 673, 997, 829, 294, 314, 480, 542, 713, 449, 897, 850, 209, 983, 883, 307, 738, 314, 88, 631, 441, 20, 420, 15, 10, 592, 490, 6, 999}, 888));
    ExampleRunner.eq(106, 3, new Cut().getMaximum(new int[]{20, 10, 13}, 1));
    ExampleRunner.eq(107, 2, new Cut().getMaximum(new int[]{23, 20}, 1));
    ExampleRunner.eq(108, 2, new Cut().getMaximum(new int[]{13, 20, 23}, 1));
    ExampleRunner.eq(109, 8, new Cut().getMaximum(new int[]{10, 21, 50, 10, 50, 50, 20, 50, 20, 50, 20, 50, 50, 31}, 3));
    ExampleRunner.eq(110, 13, new Cut().getMaximum(new int[]{100, 20, 20, 20, 20, 9}, 9));
    ExampleRunner.eq(111, 12, new Cut().getMaximum(new int[]{50, 50, 50}, 10));
    ExampleRunner.eq(112, 2, new Cut().getMaximum(new int[]{13, 20, 13}, 1));
    ExampleRunner.eq(113, 2, new Cut().getMaximum(new int[]{17, 20, 51}, 1));
    ExampleRunner.eq(114, 4, new Cut().getMaximum(new int[]{40, 35, 35}, 3));
    ExampleRunner.eq(115, 2, new Cut().getMaximum(new int[]{15, 20, 20}, 1));
    ExampleRunner.eq(116, 19, new Cut().getMaximum(new int[]{100, 100, 20}, 17));
    ExampleRunner.eq(117, 6, new Cut().getMaximum(new int[]{40, 20, 20, 20}, 3));
    ExampleRunner.eq(118, 3, new Cut().getMaximum(new int[]{31, 20}, 2));
    ExampleRunner.eq(119, 4, new Cut().getMaximum(new int[]{100, 100, 100, 20, 20}, 2));
    ExampleRunner.eq(120, 1, new Cut().getMaximum(new int[]{50}, 1));
    ExampleRunner.eq(121, 2, new Cut().getMaximum(new int[]{20}, 1));
    ExampleRunner.eq(122, 7, new Cut().getMaximum(new int[]{40, 40, 30}, 5));
    ExampleRunner.eq(123, 4, new Cut().getMaximum(new int[]{100, 20, 20}, 2));
    ExampleRunner.eq(124, 5, new Cut().getMaximum(new int[]{40, 30, 20, 40}, 3));
    ExampleRunner.eq(125, 2, new Cut().getMaximum(new int[]{50}, 2));
    ExampleRunner.eq(126, 5, new Cut().getMaximum(new int[]{20, 20, 30, 48}, 3));
    ExampleRunner.eq(127, 3, new Cut().getMaximum(new int[]{30, 33}, 2));
    ExampleRunner.eq(128, 3, new Cut().getMaximum(new int[]{1, 10, 22, 20}, 1));
    ExampleRunner.eq(129, 4, new Cut().getMaximum(new int[]{30, 40}, 3));
    ExampleRunner.eq(130, 4, new Cut().getMaximum(new int[]{30, 10}, 2));
    ExampleRunner.eq(131, 1, new Cut().getMaximum(new int[]{30}, 1));
    ExampleRunner.eq(132, 4, new Cut().getMaximum(new int[]{40, 30, 20, 20}, 2));
    ExampleRunner.eq(133, 1010, new Cut().getMaximum(new int[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}, 1000));
    ExampleRunner.eq(134, 2, new Cut().getMaximum(new int[]{13, 13, 20}, 1));
    ExampleRunner.eq(135, 4, new Cut().getMaximum(new int[]{50, 20, 20, 13}, 2));
    ExampleRunner.eq(136, 4, new Cut().getMaximum(new int[]{5, 20, 15, 20}, 2));
    ExampleRunner.eq(137, 6, new Cut().getMaximum(new int[]{23, 23, 23, 30, 33, 33, 33}, 5));
    ExampleRunner.eq(138, 3, new Cut().getMaximum(new int[]{11, 30}, 2));
    ExampleRunner.eq(139, 2, new Cut().getMaximum(new int[]{50, 20}, 1));
    ExampleRunner.eq(140, 2, new Cut().getMaximum(new int[]{15, 16, 17, 18, 19, 20}, 1));
    ExampleRunner.eq(141, 2, new Cut().getMaximum(new int[]{15, 20}, 1));
    ExampleRunner.eq(142, 3, new Cut().getMaximum(new int[]{13, 20, 10, 20}, 1));
    ExampleRunner.eq(143, 6, new Cut().getMaximum(new int[]{50, 30, 30}, 4));
    ExampleRunner.eq(144, 2, new Cut().getMaximum(new int[]{98, 72, 20, 98}, 1));
    ExampleRunner.eq(145, 4, new Cut().getMaximum(new int[]{20, 20}, 3));
    ExampleRunner.eq(146, 6, new Cut().getMaximum(new int[]{12, 22, 23, 33, 60}, 5));
    ExampleRunner.eq(147, 5, new Cut().getMaximum(new int[]{11, 50, 40, 13, 30, 20, 11}, 3));
    ExampleRunner.eq(148, 2, new Cut().getMaximum(new int[]{20, 50}, 1));
    ExampleRunner.eq(149, 3, new Cut().getMaximum(new int[]{23, 20, 10, 11}, 1));
    ExampleRunner.eq(150, 3, new Cut().getMaximum(new int[]{48, 10, 20}, 1));
    ExampleRunner.eq(151, 5, new Cut().getMaximum(new int[]{48, 34, 20}, 4));
    ExampleRunner.eq(152, 7, new Cut().getMaximum(new int[]{63, 40, 10, 20, 61}, 4));
    ExampleRunner.eq(153, 1, new Cut().getMaximum(new int[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}, 1));
    ExampleRunner.eq(154, 6, new Cut().getMaximum(new int[]{30, 40, 20, 20, 20}, 3));
    ExampleRunner.eq(155, 2, new Cut().getMaximum(new int[]{20, 22}, 1));
    ExampleRunner.eq(156, 2, new Cut().getMaximum(new int[]{10, 11, 30}, 1));
    ExampleRunner.eq(157, 5, new Cut().getMaximum(new int[]{30, 10, 20, 20}, 2));
    ExampleRunner.eq(158, 1026, new Cut().getMaximum(new int[]{41, 320, 150, 460, 930, 700, 258, 952, 990, 820, 350, 899, 290, 400, 699, 440, 750, 860, 642, 10, 675, 291, 650, 126, 220, 520, 630, 17, 715, 500, 304, 160, 280, 30, 240, 419, 875, 340, 992, 360, 610, 60, 730, 960, 910, 928, 602, 530, 100, 907}, 1000));
    ExampleRunner.eq(159, 7, new Cut().getMaximum(new int[]{34, 30, 20, 20, 30}, 4));
    ExampleRunner.eq(160, 2, new Cut().getMaximum(new int[]{15, 20, 25}, 1));
    ExampleRunner.eq(161, 4, new Cut().getMaximum(new int[]{11, 11, 11, 20}, 3));
    ExampleRunner.eq(162, 2, new Cut().getMaximum(new int[]{30, 20, 30}, 1));
    ExampleRunner.eq(163, 7, new Cut().getMaximum(new int[]{50, 20, 20, 20}, 4));
    ExampleRunner.eq(164, 2, new Cut().getMaximum(new int[]{21, 20}, 1));
    ExampleRunner.eq(165, 16, new Cut().getMaximum(new int[]{30, 50, 30, 50}, 350));
    ExampleRunner.eq(166, 3, new Cut().getMaximum(new int[]{21, 57, 30}, 2));
    ExampleRunner.eq(167, 6, new Cut().getMaximum(new int[]{19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21}, 5));
    ExampleRunner.eq(168, 2, new Cut().getMaximum(new int[]{50, 40}, 2));
    ExampleRunner.eq(169, 10, new Cut().getMaximum(new int[]{30, 80, 70}, 8));
    ExampleRunner.eq(170, 4, new Cut().getMaximum(new int[]{44, 40}, 3));
    ExampleRunner.eq(171, 3, new Cut().getMaximum(new int[]{30, 22}, 2));
    ExampleRunner.eq(172, 10, new Cut().getMaximum(new int[]{15, 20, 50, 20, 30, 30}, 6));
    ExampleRunner.eq(173, 3, new Cut().getMaximum(new int[]{20, 70}, 2));
    ExampleRunner.eq(174, 2, new Cut().getMaximum(new int[]{20, 23}, 1));
    ExampleRunner.eq(175, 10, new Cut().getMaximum(new int[]{50, 20, 20, 20, 20, 20}, 5));
    ExampleRunner.eq(176, 4, new Cut().getMaximum(new int[]{48, 20, 20}, 2));
    ExampleRunner.eq(177, 3, new Cut().getMaximum(new int[]{30, 45}, 2));
    ExampleRunner.eq(178, 2, new Cut().getMaximum(new int[]{20, 30}, 1));
    ExampleRunner.eq(179, 3, new Cut().getMaximum(new int[]{30, 30}, 2));
    ExampleRunner.eq(180, 3, new Cut().getMaximum(new int[]{50, 20}, 2));
    ExampleRunner.eq(181, 3, new Cut().getMaximum(new int[]{23, 30, 13, 55}, 2));
    ExampleRunner.eq(182, 3, new Cut().getMaximum(new int[]{13, 13, 20}, 2));
    ExampleRunner.eq(183, 3, new Cut().getMaximum(new int[]{20, 30}, 2));
    ExampleRunner.eq(184, 6, new Cut().getMaximum(new int[]{20, 20, 41}, 4));
    ExampleRunner.eq(185, 9, new Cut().getMaximum(new int[]{90}, 8));
    ExampleRunner.eq(186, 3, new Cut().getMaximum(new int[]{30}, 2));
    ExampleRunner.eq(187, 10, new Cut().getMaximum(new int[]{85, 60, 30, 20, 20}, 7));
    ExampleRunner.eq(188, 8, new Cut().getMaximum(new int[]{53, 53, 53, 60, 63, 63, 63}, 7));
    ExampleRunner.eq(189, 103, new Cut().getMaximum(new int[]{1000, 20, 20, 20}, 100));
    ExampleRunner.eq(190, 6, new Cut().getMaximum(new int[]{20, 30, 10}, 3));
    ExampleRunner.eq(191, 5, new Cut().getMaximum(new int[]{30, 30, 2, 17, 10}, 3));
    ExampleRunner.eq(192, 1, new Cut().getMaximum(new int[]{10}, 1));
    ExampleRunner.eq(193, 4, new Cut().getMaximum(new int[]{30, 10, 10, 10}, 1));
    ExampleRunner.eq(194, 4, new Cut().getMaximum(new int[]{50, 20}, 3));
    ExampleRunner.eq(195, 4, new Cut().getMaximum(new int[]{50, 30}, 3));
    ExampleRunner.eq(196, 9, new Cut().getMaximum(new int[]{20, 30, 40, 50}, 6));
    ExampleRunner.eq(197, 3, new Cut().getMaximum(new int[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 30, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}, 2));
    ExampleRunner.eq(198, 6, new Cut().getMaximum(new int[]{30, 50, 30}, 4));
    ExampleRunner.eq(199, 3, new Cut().getMaximum(new int[]{100, 30}, 2));
    ExampleRunner.eq(200, 3, new Cut().getMaximum(new int[]{30, 31}, 2));
    ExampleRunner.eq(201, 4, new Cut().getMaximum(new int[]{100, 11, 21, 30, 20, 20}, 2));
    ExampleRunner.eq(202, 3, new Cut().getMaximum(new int[]{50}, 3));
    ExampleRunner.eq(203, 4, new Cut().getMaximum(new int[]{38, 20}, 3));
    ExampleRunner.eq(204, 4, new Cut().getMaximum(new int[]{63, 40}, 3));
    ExampleRunner.eq(205, 5, new Cut().getMaximum(new int[]{40, 20, 30, 50}, 3));
    ExampleRunner.eq(206, 1, new Cut().getMaximum(new int[]{300}, 1));
    ExampleRunner.eq(207, 1, new Cut().getMaximum(new int[]{100}, 1));
    ExampleRunner.eq(208, 2, new Cut().getMaximum(new int[]{60, 20}, 1));
    ExampleRunner.eq(209, 4, new Cut().getMaximum(new int[]{18, 18, 12, 40, 18, 18}, 3));
    ExampleRunner.eq(210, 7, new Cut().getMaximum(new int[]{50, 50, 50, 40, 30, 40}, 5));
    ExampleRunner.eq(211, 4, new Cut().getMaximum(new int[]{31, 20, 20}, 2));
    ExampleRunner.eq(212, 4, new Cut().getMaximum(new int[]{13, 13, 13, 40}, 3));
    ExampleRunner.eq(213, 5, new Cut().getMaximum(new int[]{11, 11, 200, 200, 20, 20, 200, 1000}, 3));
    ExampleRunner.eq(214, 3, new Cut().getMaximum(new int[]{20, 10}, 1));
    ExampleRunner.eq(215, 2, new Cut().getMaximum(new int[]{60}, 2));
    ExampleRunner.eq(216, 4, new Cut().getMaximum(new int[]{20, 20, 30}, 2));
    ExampleRunner.eq(217, 0, new Cut().getMaximum(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 7));
    ExampleRunner.eq(218, 15, new Cut().getMaximum(new int[]{143, 140, 15}, 14));
    ExampleRunner.eq(219, 3, new Cut().getMaximum(new int[]{23, 23, 20}, 2));
    ExampleRunner.eq(220, 6, new Cut().getMaximum(new int[]{40, 30, 20, 20, 20}, 3));
    ExampleRunner.eq(221, 6, new Cut().getMaximum(new int[]{13, 23, 40, 20, 20, 10, 33}, 3));
    ExampleRunner.eq(222, 16, new Cut().getMaximum(new int[]{100, 100, 100, 19, 29, 39, 13, 33}, 15));
    ExampleRunner.eq(223, 3, new Cut().getMaximum(new int[]{13, 30}, 2));
    ExampleRunner.eq(224, 2, new Cut().getMaximum(new int[]{12, 12, 20}, 1));
    ExampleRunner.eq(225, 7, new Cut().getMaximum(new int[]{30, 10, 10, 10, 50}, 3));
    ExampleRunner.eq(226, 2, new Cut().getMaximum(new int[]{39, 20, 20}, 1));
    ExampleRunner.eq(227, 3, new Cut().getMaximum(new int[]{35, 100, 30}, 2));
    ExampleRunner.eq(228, 4, new Cut().getMaximum(new int[]{34, 28}, 4));
    ExampleRunner.eq(229, 2, new Cut().getMaximum(new int[]{5, 5, 15, 20}, 1));
    ExampleRunner.eq(230, 9, new Cut().getMaximum(new int[]{70, 30, 30, 30}, 6));
    ExampleRunner.eq(231, 3, new Cut().getMaximum(new int[]{13, 13, 13, 30}, 2));
    ExampleRunner.eq(232, 8, new Cut().getMaximum(new int[]{50, 20, 20, 20, 20}, 4));
    ExampleRunner.eq(233, 2, new Cut().getMaximum(new int[]{34, 30, 20}, 1));
    ExampleRunner.eq(234, 5, new Cut().getMaximum(new int[]{40, 20, 30}, 3));
    ExampleRunner.eq(235, 2, new Cut().getMaximum(new int[]{27}, 5));
    ExampleRunner.eq(236, 2, new Cut().getMaximum(new int[]{2, 30, 20}, 1));
    ExampleRunner.eq(237, 3, new Cut().getMaximum(new int[]{10, 20}, 1));
    ExampleRunner.eq(238, 2, new Cut().getMaximum(new int[]{15, 20, 35}, 1));
    ExampleRunner.eq(239, 2, new Cut().getMaximum(new int[]{12, 20}, 1));
    ExampleRunner.eq(240, 9, new Cut().getMaximum(new int[]{19, 20, 23, 25, 72, 51, 40, 30, 20, 16, 10, 12}, 5));
    ExampleRunner.eq(241, 4, new Cut().getMaximum(new int[]{19, 40, 63}, 3));
    ExampleRunner.eq(242, 4, new Cut().getMaximum(new int[]{20, 20}, 2));
    ExampleRunner.eq(243, 2, new Cut().getMaximum(new int[]{13, 20, 13, 23, 36}, 1));
    ExampleRunner.eq(244, 13, new Cut().getMaximum(new int[]{90, 120, 123, 45, 40, 30, 10, 20, 20, 22, 55, 30, 50}, 8));
    ExampleRunner.eq(245, 6, new Cut().getMaximum(new int[]{60, 101}, 5));
    ExampleRunner.eq(246, 12, new Cut().getMaximum(new int[]{100, 40, 40, 40}, 9));
    ExampleRunner.eq(247, 5, new Cut().getMaximum(new int[]{10, 50, 40, 25}, 3));
    ExampleRunner.eq(248, 3, new Cut().getMaximum(new int[]{30, 50, 30, 50}, 2));
    ExampleRunner.eq(249, 4, new Cut().getMaximum(new int[]{40}, 3));
    ExampleRunner.eq(250, 4, new Cut().getMaximum(new int[]{50, 50, 30}, 3));
    ExampleRunner.eq(251, 1, new Cut().getMaximum(new int[]{30, 30}, 1));
    ExampleRunner.eq(252, 2, new Cut().getMaximum(new int[]{40, 20, 30}, 1));
    ExampleRunner.eq(253, 8, new Cut().getMaximum(new int[]{63, 40, 20, 10, 10}, 4));
    ExampleRunner.eq(254, 4, new Cut().getMaximum(new int[]{13, 13, 13, 30, 40}, 3));
    ExampleRunner.eq(255, 5, new Cut().getMaximum(new int[]{30, 30, 20}, 3));
    ExampleRunner.eq(256, 9, new Cut().getMaximum(new int[]{11, 11, 11, 30, 30, 30}, 6));
    ExampleRunner.eq(257, 6, new Cut().getMaximum(new int[]{10, 30, 20, 3}, 3));
    ExampleRunner.eq(258, 17, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 202, 20, 20}, 6));
    ExampleRunner.eq(259, 11, new Cut().getMaximum(new int[]{70, 80, 23, 20, 20, 20, 13, 40, 20, 30}, 6));
    ExampleRunner.eq(260, 9, new Cut().getMaximum(new int[]{10, 10, 10, 30, 30, 21, 21, 41, 45, 49}, 4));
    ExampleRunner.eq(261, 12, new Cut().getMaximum(new int[]{60, 20, 20, 20, 20, 20, 20, 20, 20}, 6));
    ExampleRunner.eq(262, 25, new Cut().getMaximum(new int[]{50, 50, 50, 50, 50}, 20));
    ExampleRunner.eq(263, 2, new Cut().getMaximum(new int[]{30, 50, 60, 50, 40, 20, 40, 30, 60, 80}, 1));
    ExampleRunner.eq(264, 2, new Cut().getMaximum(new int[]{13, 23, 20}, 1));
    ExampleRunner.eq(265, 9, new Cut().getMaximum(new int[]{60, 20, 20, 20, 20}, 5));
    ExampleRunner.eq(266, 6, new Cut().getMaximum(new int[]{30, 20, 20, 17, 10}, 3));
    ExampleRunner.eq(267, 5, new Cut().getMaximum(new int[]{15, 20, 30}, 3));
    ExampleRunner.eq(268, 5, new Cut().getMaximum(new int[]{60, 30, 20}, 3));
    ExampleRunner.eq(269, 3, new Cut().getMaximum(new int[]{73, 20}, 2));
    ExampleRunner.eq(270, 5, new Cut().getMaximum(new int[]{20, 30, 50}, 3));
    ExampleRunner.eq(271, 7, new Cut().getMaximum(new int[]{100, 105}, 7));
    ExampleRunner.eq(272, 1, new Cut().getMaximum(new int[]{34}, 1));
    ExampleRunner.eq(273, 10, new Cut().getMaximum(new int[]{99, 100, 999}, 9));
    ExampleRunner.eq(274, 3, new Cut().getMaximum(new int[]{15, 15, 30}, 2));
    ExampleRunner.eq(275, 2, new Cut().getMaximum(new int[]{20, 21}, 1));
    ExampleRunner.eq(276, 9, new Cut().getMaximum(new int[]{70, 30, 30, 30, 30}, 6));
    ExampleRunner.eq(277, 5, new Cut().getMaximum(new int[]{35, 30, 10, 10}, 2));
    ExampleRunner.eq(278, 1, new Cut().getMaximum(new int[]{40}, 1));
    ExampleRunner.eq(279, 7, new Cut().getMaximum(new int[]{30, 50, 40, 50}, 5));
    ExampleRunner.eq(280, 7, new Cut().getMaximum(new int[]{20, 20, 30, 30}, 4));
    ExampleRunner.eq(281, 9, new Cut().getMaximum(new int[]{19, 20, 23, 25, 72, 51, 40, 30, 20, 16, 10, 12, 13, 14}, 5));
    ExampleRunner.eq(282, 2, new Cut().getMaximum(new int[]{13, 20, 33}, 1));
    ExampleRunner.eq(283, 3, new Cut().getMaximum(new int[]{100}, 3));
    ExampleRunner.eq(284, 11, new Cut().getMaximum(new int[]{70, 80, 20, 20, 20, 40, 20, 30}, 6));
    ExampleRunner.eq(285, 7, new Cut().getMaximum(new int[]{13, 13, 13, 30, 40}, 5));
    ExampleRunner.eq(286, 6, new Cut().getMaximum(new int[]{1000, 10}, 5));
    ExampleRunner.eq(287, 7, new Cut().getMaximum(new int[]{55, 50, 50, 50, 40, 30, 40}, 5));
    ExampleRunner.eq(288, 10, new Cut().getMaximum(new int[]{11, 21, 31, 41, 51, 100}, 9));
    ExampleRunner.eq(289, 50, new Cut().getMaximum(new int[]{10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 1000));
    ExampleRunner.eq(290, 3, new Cut().getMaximum(new int[]{7, 74, 20}, 2));
    ExampleRunner.eq(291, 6, new Cut().getMaximum(new int[]{40, 20, 20, 20, 20}, 3));
  }
}
